<template>
  <view class="searchBc" :style="{'background':bgcolor}" @click="handlerSearch">
    <view class="searchIconText" :style="{'border-radius':radius+'px'}">
      <uni-icons type="search" size="16"></uni-icons>
      <text>搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    props: {
      bgcolor: {
        bgcolor: "#c00000"
      },

      radius: {
        radius: 18
      }
    },
    name: "my-search",
    data() {
      return {

      };
    },
    methods:{
      handlerSearch(){
        console.log("ok")
        this.$emit('click')
      }
    },
  }
</script>

<style lang="scss">
  
  .searchBc {
    height: 50px;
    background: #c00000;
    display:block;
    align-items: center;
  
    .searchIconText {
      margin: 0 10px;
      height: 36px;
      border-radius: 15px;
      background: #FFFFFF;
      display: flex;
      justify-content: center;
      align-items: center;
      text-align:center;
  transform:translateY(18%);

    }
  }
</style>
